package com.duan.blog.controller;

import com.duan.blog.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class testController {
    @Autowired
    UserService userServiceImpl;

    @RequestMapping("/index")
    public String test(){
        return "index";
    }

    @RequestMapping("/test")
    @ResponseBody
    public void test1(){
        System.out.println(userServiceImpl.selectUserById(1).toString());
    }
}
